From 5c851ea7d35fa9027b5fb9e52472bdad71c02644 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 28 May 1993 08:28:20 +0000 Subject: [PATCH] * etags.c: Replace the CPP tangle for alloca with the one from the autoconf documentation, since that's working elsewhere. --- lib-src/etags.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index dd1153e2054..a829fdc35a8 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -35,15 +35,22 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "getopt.h" -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else -#ifdef sparc -#include -#else -extern char *alloca (); -#endif +/* AIX requires this to be the first thing in the file. */ +#ifdef __GNUC__ +#ifndef alloca +#define alloca __builtin_alloca #endif +#else /* not __GNUC__ */ +#if HAVE_ALLOCA_H +#include +#else /* not HAVE_ALLOCA_H */ +#ifdef _AIX + #pragma alloca +#else /* not _AIX */ +char *alloca (); +#endif /* not _AIX */ +#endif /* not HAVE_ALLOCA_H */ +#endif /* not __GNUC__ */ extern char *malloc (), *realloc (); extern char *getenv (); -- 2.30.2